package com.pignest.hotel.definition;

import java.util.ArrayList;
import java.util.List;


public enum InComeItemType {
	
	FF("房费",0),
	FJTZF("房间调整费",0),
	JSFF("加收房费",0),

	YJ("押金",0),
	XCK("续存款",0),
	
	WPXF("物品消费",0), 
	QXF("清洗费",0),
	PCF("损坏赔偿费",0),
	CX("撤消",1)
	;
	
	private String name;
	private final int type;
	InComeItemType(String name,int type) {
		this.name = name;
		this.type=type;
	}
	
	public String getName() {
		return name;
	}

	public String getValue() {
		return name;
	}
	public static String[][] getInComeItem(boolean all) {
		InComeItemType[] inComeItems = InComeItemType.values();
		List<String[]> m = new ArrayList<String[]>();
		for (int i = 0; i < inComeItems.length; i++) {
			if (all || inComeItems[i].type == 0) {
				String[] a = new String[] {inComeItems[i].name(), inComeItems[i].name};
				m.add(a);
			}
		}
		return m.toArray(new String[2][inComeItems.length]);
	}
	public static InComeItemType valueof(String name) {
		try {
			return valueOf(name);
		} catch (Exception e) {
		}
		return null;
	}
}
